<%@ page language="java"  pageEncoding="UTF-8"  import="java.util.*,com.knife.tools.TreeUtils"%>
<%@ include file="checkUser.jsp" %>
<%
try{	
	if(user!=null){
		String nodeId = request.getParameter("id");
		nodeId = nodeId == null ? "":nodeId.trim();
		String siteId = request.getParameter("siteId");
		siteId = siteId == null ? "":siteId.trim();
		String jsonStr = "";
		if(popedom==0){
			//jsonStr = TreeUtils.getSubTreeNodesJson(nodeId,user.getId());
		}else{
			jsonStr = TreeUtils.getTemplatesJson(siteId,nodeId);
		}
		response.setContentType("text/json;charset=utf-8");
		response.getWriter().write(jsonStr);
	}
}catch(Exception e){
	//response.sendRedirect("/admin.ad");
}
%>